from rest_framework.serializers import ModelSerializer
from .models import Carousel, Goods, Category, GoodImg, GoodCollect


class CarouselSer(ModelSerializer):
    class Meta:
        model = Carousel
        fields = '__all__'


class GoodsSer(ModelSerializer):
    class Meta:
        model = Goods
        fields = '__all__'


class CateSer(ModelSerializer):
    """类别序列化器"""
    class Meta:
        model = Category
        fields = '__all__'


class GoodImgSer(ModelSerializer):
    class Meta:
        model = GoodImg
        fields = '__all__'


class GoodCollectSer(ModelSerializer):
    """类别序列化器"""
    class Meta:
        model = GoodCollect
        fields = '__all__'